from DrissionPage import Chromium

# 连接浏览器
browser = Chromium()  
tab1 = browser.latest_tab

# tab.get("https://www.baidu.com")

# ele = tab.ele('#kw')
# ele.input('DrissionPage')

# tab.ele('#su').click()
# links = tab.eles('tag:h3')  
# # 遍历并打印结果
# for link in links:  
#     print(link.text)


tab1.get('http://DrissionPage.cn')  # 标签页访问一个网址
ele1 = tab1.ele('text=文档').next().click()  # 获取文本为“文档”的元素
